<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="default" />
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js"
	type="text/javascript"></script>
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js"
	type="text/javascript"></script>
<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js"
	type="text/javascript"></script>

<script type="text/javascript">
	$(document).ready(
			function() {
				$(".o-a-form-date").datetimepicker({
					language : 'zh-CN',
					autoclose : true,
					minView : 2,
					todayBtn : 1,
					pickerPosition : "bottom-left"
				});
				$('[data-accounting]')
				.each(function() {
							var $this = $(this);
							if ($this.attr("data-accounting-precision")
									&& "" != $this.attr("data-accounting-precision")) {
								$this.html(accounting.formatMoney(
														$this.attr("data-accounting"),"¥ ",
														$this.attr("data-accounting-precision") * 1));
							} else {
								$this.html(accounting.formatMoney($this
																.attr("data-accounting"),"¥ "));
							}
						});
				parent.document.getElementById("versionFrame").height = document.body.scrollHeight;
			});
</script>
</head>
<body>
<form:form id="listForm" action="" modelAttribute="receiveDetail" method="post" class="form-inline" role="form">
			<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
				<thead class="t_1">
					<tr>
					    <th>商品编码</th>
						<th>商品条码</th>
						<th>商品名称</th>
						<th>规格</th>
						<th>收货单位</th>
						<th>收货数量</th>
						<th>入库单价</th>
						<th>入库金额</th>
						<th>进价税额</th>
						<th>含税金额</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${page.list}" var="receiveDetail">
							<tr>
							    <td>${receiveDetail.mantr}</td>
								<td>${receiveDetail.barCode}</td>
								<td>${receiveDetail.mannm}</td>
								<td>${receiveDetail.receiveModel}</td>
								<td>${receiveDetail.uom}</td>
								<td>${receiveDetail.quantity}</td>
								<td data-accounting="${receiveDetail.price}" data-accounting-precision="2"></td>
								<td data-accounting="${receiveDetail.amount}" data-accounting-precision="2"></td>
								<td data-accounting="${receiveDetail.tax}" data-accounting-precision="2"></td>
								<td data-accounting="${receiveDetail.amountNet}" data-accounting-precision="2"></td>
							</tr>
					</c:forEach>
				</tbody>
			</table>
		<pager:pager pageSize="1" pageNo="${page.pageNo}" url="" total="${page.total}"/>	
		<script type="text/javascript" src="${staticPath}/js/list.js"></script>
</form:form>
</body>
</html>